/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Embeddable
@XmlRootElement
public class SidedishmenuPK implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Basic(optional = false)
    @Column(name = "SidedishmenuID")
    private long sidedishmenuID;
    @Basic(optional = false)
    @Column(name = "menu_MenuID")
    private long menuMenuID;
    @Basic(optional = false)
    @Column(name = "menu_MenuID_SidedishID")
    private long menuMenuIDSidedishID;

    public SidedishmenuPK() {
    }

    public SidedishmenuPK(long sidedishmenuID, long menuMenuID, long menuMenuIDSidedishID) {
        this.sidedishmenuID = sidedishmenuID;
        this.menuMenuID = menuMenuID;
        this.menuMenuIDSidedishID = menuMenuIDSidedishID;
    }

    public long getSidedishmenuID() {
        return sidedishmenuID;
    }

    public void setSidedishmenuID(long sidedishmenuID) {
        this.sidedishmenuID = sidedishmenuID;
    }

    public long getMenuMenuID() {
        return menuMenuID;
    }

    public void setMenuMenuID(long menuMenuID) {
        this.menuMenuID = menuMenuID;
    }

    public long getMenuMenuIDSidedishID() {
        return menuMenuIDSidedishID;
    }

    public void setMenuMenuIDSidedishID(long menuMenuIDSidedishID) {
        this.menuMenuIDSidedishID = menuMenuIDSidedishID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) sidedishmenuID;
        hash += (int) menuMenuID;
        hash += (int) menuMenuIDSidedishID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SidedishmenuPK)) {
            return false;
        }
        SidedishmenuPK other = (SidedishmenuPK) object;
        if (this.sidedishmenuID != other.sidedishmenuID) {
            return false;
        }
        if (this.menuMenuID != other.menuMenuID) {
            return false;
        }
        if (this.menuMenuIDSidedishID != other.menuMenuIDSidedishID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.SidedishmenuPK[sidedishmenuID=" + sidedishmenuID + ", menuMenuID=" + menuMenuID + ", menuMenuIDSidedishID=" + menuMenuIDSidedishID + "]";
    }

}
